#include <iostream>

using namespace std;

template<class T>
class cal
{
public:
    cal(T mx, T my) : x(mx), y(my) {} 

    T calNum()
    {
        cout << "Generalization " << endl;
        return x+y;
    }  
private:
    T x;
    T y;
};

template<>
class cal <int>
{
public:
    cal(int mx, int my) : x(mx), y(my) {} 

    int calNum()
    {
        cout << "Partial specialization" << endl;
        return x+y;
    }  
private:
    int x;
    int y;
};


int main()
{
    cal<double> *obj1 = new cal<double>(1.1, 2.2);
    obj1->calNum();

    cal<int> *obj2 = new cal<int>(1.1, 2.2);
    obj2->calNum();
    
}